home *** CD-ROM | disk | FTP | other *** search
/ CICA 1993 April / CICA MS Windows - April 1993.iso / unzipped / toolbook / newdlg / newdlg.tbk (.txt) next >
Asymetrix ToolBook File  |  1992-04-06  |  20KB  |  497 lines

  1. rminal
  2. gD|D|
  3. gD|D|
  4. g.dll"
  5. dialog(
  6. setValue(
  7. getValue(
  8. "Cancel"
  9. dlgBox 
  10. "524480,3," & x & "," & y & ",152,128,,," & 
  11. --org    
  12. LB,12.88,9.19,128.80,82.42,7,1352728577,131,
  13. ,OK,20.34,99.65,50.90,12.31,8,1342242817,128," \
  14. LB,12.88,9.19,128.80,82.42,7,1352728579,131,
  15. ,OK,20.34,99.65,50.90,12.31,8,1342242817,128," \
  16. --mul    
  17. LB,12.88,9.19,128.80,82.42,7,1352728587,131,
  18. ,OK,20.34,99.65,50.90,12.31,8,1342242817,128," \
  19.  & ",0," & 
  20. & ",83.09,99.65,50.86,12.31,9,1342242816,128,
  21. dlgInit 
  22. "listbox LB,l7,
  23. BOK,b8,TRUE
  24. ,b9,FALSE"
  25. "An initialization error occurred."
  26. retValue 
  27. , "nlistbox LB")
  28.  "User Chose" && 
  29.     unlinkDLL "
  30. "/"/"/"/"/"/"/"/"/"/"/"/
  31.     --Move linkDLL statement 
  32. handler
  33. "tbkdlg.dll"
  34. dialog(
  35. setValue(
  36. getValue(
  37. init 
  38. dlgInit 
  39. ,"","")
  40. function
  41. d"Dialog Message", 
  42. , "dialogMessage1")
  43. retValue 
  44. dlgBox 
  45. ", "")
  46. buttonUp
  47. buttonUp
  48. tbkdlg.dll
  49. dialog
  50. setValue
  51. getValue
  52. dlgInit
  53. Dialog Message
  54. dialogMessage1
  55. setValue
  56. dlgBox
  57. dialog
  58. retValue
  59. dlgInit
  60. button OK,b7,TRUE
  61. button Cancel,b8,FALSE
  62. ,b9,FALSE
  63. ,b10,FALSE
  64. ,b11,TRUE
  65. dlgBox
  66. 524480,6,30,20,142,128,,,Dialog,8,Helv,,39.05,24.78,84.00,13.17,6,1350631424,129,Edit,0,OK,14.78,93.13,50.86,12.31,7,1342242817,128,OK,0,Cancel,74.51,93.13,50.86,12.31,8,1342242816,128,Cancel,0,,12.91,8.70,50.86,12.31,9,1342177289,128,Pushbutton,0,,12.91,50.91,50.86,12.31,10,1342177289,128,Pushbutton,0,,12.91,69.01,50.86,12.31,11,1342177289,128,Pushbutton,0
  67. ctrlID
  68. Link Radio Button to Edit Control
  69.     --Move linkDLL statement 
  70. handler
  71. "tbkdlg.dll"
  72. dialog(
  73. setValue(
  74. getValue(
  75. init 
  76. dlgInit 
  77. ,"","")
  78. function
  79. d"Dialog Message", 
  80. , "dialogMessage3")
  81. retValue 
  82. dlgBox 
  83. ", "")
  84. buttonUp
  85. buttonUp
  86. tbkdlg.dll
  87. dialog
  88. setValue
  89. getValue
  90. dlgInit
  91. Dialog Message
  92. dialogMessage3
  93. setValue
  94. dlgBox
  95. dialog
  96. retValue
  97. ctrlID
  98. dlgBox
  99. 524480,6,30,20,142,128,,,Dialog,8,Helv,,39.05,24.78,84.00,13.17,6,1350631424,129,Edit,0,OK,14.78,93.13,50.86,12.31,7,1342242817,128,OK,0,Cancel,74.51,93.13,50.86,12.31,8,1342242816,128,Don't Dismiss,0,,12.91,8.70,50.86,12.31,9,1342177289,128,Pushbutton,0,,12.91,50.91,50.86,12.31,10,1342177289,128,Pushbutton,0,,12.91,69.01,50.86,12.31,11,1342177289,128,Pushbutton,0
  100. D    dlgInit
  101. ,e6,Edit
  102. button OK,b7,TRUE
  103. button Cancel,b8,BRAD
  104. ,b9,TRUE
  105. ,b10,FALSE
  106. ,b11,FALSE
  107. Don't Dismiss on Button Click
  108.     --Move linkDLL statement 
  109. handler
  110. "tbkdlg.dll"
  111. dialog(
  112. setValue(
  113. getValue(
  114. init 
  115. dlgInit 
  116. ,"","")
  117. function
  118. d"Dialog Message", 
  119. , "dialogMessage2")
  120. retValue 
  121. dlgBox 
  122. ", "")
  123. buttonUp
  124. buttonUp
  125. tbkdlg.dll
  126. dialog
  127. setValue
  128. getValue
  129. dlgInit
  130. Dialog Message
  131. dialogMessage2
  132. setValue
  133. dlgBox
  134. dialog
  135. retValue
  136. ctrlID
  137. dlgBox
  138. 524480,6,30,20,142,128,,,Dialog,8,Helv,,39.05,24.78,84.00,13.17,6,1350631424,129,Edit,0,OK,14.78,93.13,50.86,12.31,7,1342242817,128,OK,0,Cancel,74.51,93.13,50.86,12.31,8,1342242816,128,Cancel,0,,12.91,8.70,50.86,12.31,9,1342177289,128,Pushbutton,0,,12.91,50.91,50.86,12.31,10,1342177289,128,Pushbutton,0,,12.91,69.01,50.86,12.31,11,1342177289,128,Pushbutton,0
  139. dlgInit
  140. ,e6,Edit
  141. button OK,b7,TRUE
  142. button Cancel,b8,FALSE
  143. ,b9,TRUE
  144. ,b10,FALSE
  145. ,b11,FALSE
  146. Link OK Button to Edit Control
  147.     linkDLL "tbkdlg.dll"
  148. dialog(
  149. setValue(
  150. getValue(
  151. Make 
  152. info fit 
  153. Command Window
  154. CommandWindow
  155. 122,351,530,468
  156.     -- Get the init property
  157. dlgInit 
  158. +,"","")
  159. function
  160. SDialog Message 
  161. , "dialogMessage")
  162. Call 
  163. retValue 
  164. dlgBox 
  165. $, "")
  166. buttonUp
  167. buttonUp
  168. tbkdlg.dll
  169. dialog
  170. setValue
  171. getValue
  172. dlgInit
  173. Dialog Message
  174. dialogMessage
  175. setValue
  176. dlgBox
  177. dialog
  178. retValue
  179. ctrlID
  180. dlgBox
  181. 524480,6,30,20,142,128,,,Dialog,8,Helv,,39.05,24.78,84.00,13.17,6,1350631424,129,Edit,0,OK,14.78,93.13,50.86,12.31,7,1342242817,128,OK,0,Cancel,74.51,93.13,50.86,12.31,8,1342242816,128,Cancel,0,,12.91,8.70,50.86,12.31,9,1342177289,128,Pushbutton,0,,12.91,50.91,50.86,12.31,10,1342177289,128,Pushbutton,0,,12.91,69.01,50.86,12.31,11,1342177289,128,Pushbutton,0
  182. dlgInit
  183. ,e6,Edit
  184. button OK,b7,TRUE
  185. button Cancel,b8,FALSE
  186. ,b9,TRUE
  187. ,b10,FALSE
  188. ,b11,FALSE
  189. Merely Report Each Message
  190.     --Move linkDLL statement 
  191. handler
  192. "tbkdlg.dll"
  193. dialog(
  194. setValue(
  195. getValue(
  196. init 
  197. dlgInit 
  198. ,"","")
  199. function
  200. d"Dialog Message", 
  201. , "dialogMessage4")
  202. retValue 
  203. dlgBox 
  204. ", "")
  205. buttonUp
  206. buttonUp
  207. tbkdlg.dll
  208. dialog
  209. setValue
  210. getValue
  211. dlgInit
  212. Dialog Message
  213. dialogMessage4
  214. setValue
  215. dlgBox
  216. dialog
  217. retValue
  218. dlgInit
  219. ,b5,TRUE
  220. ,b6,FALSE
  221. ,l7,Choice 1
  222. Choice 2
  223. Choice 3
  224. Choice 4
  225. dlgBox
  226. 524480,3,30,20,142,128,,,Dialog,8,Helv,,12.91,91.12,50.86,12.31,5,1342242817,128,OK,0,,78.25,91.12,50.86,12.31,6,1342242816,128,Cancel,0,,12.91,12.72,115.73,66.34,7,1352728579,131,NoDismiss,0
  227. ctrlID
  228. Don't Dismiss on Double Click
  229. limitEditText
  230.     linkDLL "tbkdlg.dll"
  231. dialog(
  232. setValue(
  233. getValue(
  234. init 
  235. dlgInit 
  236. ,"","")
  237. ~function
  238. Set the Dialog Message 
  239. , "dialogMessage5")
  240. Call 
  241. retValue 
  242. dlgBox 
  243. ", "")
  244. buttonUp
  245. buttonUp
  246. tbkdlg.dll
  247. dialog
  248. setValue
  249. getValue
  250. dlgInit
  251. Dialog Message
  252. dialogMessage5
  253. setValue
  254. dlgBox
  255. dialog
  256. retValue
  257. dlgInit
  258. ,e6,Edit
  259. button OK,b7,TRUE
  260. button Cancel,b8,FALSE
  261. ,b9,TRUE
  262. ,b10,FALSE
  263. ,b11,FALSE
  264. dlgBox
  265. 524480,6,30,20,142,128,,,Dialog,8,Helv,,39.05,24.78,84.00,13.17,6,1350631424,129,Edit,0,OK,14.78,93.13,50.86,12.31,7,1342242817,128,OK,0,Cancel,74.51,93.13,50.86,12.31,8,1342242816,128,Cancel,0,,12.91,8.70,50.86,12.31,9,1342177289,128,Pushbutton,0,,12.91,50.91,50.86,12.31,10,1342177289,128,Pushbutton,0,,12.91,69.01,50.86,12.31,11,1342177289,128,Pushbutton,0
  266. ctrlID
  267. Limit Edit Text
  268. Here we link 
  269. the Windows SDK functions that we will call
  270. -handlers below.
  271.     linkDLL "user"
  272. gGetDlgItem(
  273. )    -- Always verify 
  274. <> 0.
  275.  GetWindowTextLength(
  276.  EnableWindow(
  277.  CheckRadioButton(
  278. gSetFocus(
  279. SendDlgItemMessage(
  280. SendMessage(
  281. a generic OpenScript "
  282.  proc".
  283. called 
  284. qtbkdlg.dll 
  285. following 
  286. SetValue("Dialog 
  287. , "message")
  288. be sent (e.g., dialogMessage)
  289. This specific 
  290.  just puts 
  291. ] parameters 
  292. O hDlg, wMessage, wParam, lParamLO, lParamHI
  293. ,:        " & 
  294. 5 &CRLF& \
  295. ?:    " & 
  296.     " & 
  297. T:    " & 
  298. ]:    " & 
  299.  are 
  300.  procs" 
  301. RBs" 
  302.  box.
  303. They 
  304. essage1)
  305. Each 
  306.  does something possible only 
  307. qDLL.
  308. Values used 
  309. these 
  310. --        6 
  311. control.
  312. --        7 
  313. "OK" pushbutton.
  314. --        8 
  315. "Cancel" 
  316. "Don't Dismiss" 
  317. --        9,10, 
  318. lids 
  319. radio buttons.
  320. --        768 
  321. constant EN_CHANGE.
  322. --        1025 
  323. M_SETSEL.
  324. --        1033 
  325. 7LB_GETCURSEL.
  326.  links 
  327.  (9) 
  328.  (8).
  329. When 
  330.  clicks on 
  331. radion 
  332. be shifted
  333. Also, 
  334. entered 
  335. allows dialogs such 
  336. %ToolBook's
  337. "Run..." 
  338. #, where 
  339. linked 
  340. 1 Name"
  341. dialogMessage1 
  342.  = 6 
  343.  = 768 
  344. getWindowTextLength(
  345. ) <> 0
  346. checkRadioButton(
  347. 9, 11, 9)
  348. hEditControl 
  349. -- Important test, 
  350. xexist yet.
  351.             --
  352.             --
  353. Below, 2147418112 = MAKELONG(0,7FFF).
  354.             --
  355. , 1025, 0, 2147418112)
  356. B(7) 
  357.  (8).
  358.  enters 
  359. enabled.
  360. deleted 
  361. disabled.
  362. ..." 
  363. dialogMessage2 
  364.  = 6 
  365.  = 768
  366. hOKButton 
  367. ) <> 0
  368. F, 1)
  369. [, 0)
  370.  makes use 
  371. fact 
  372. been changed so 
  373. its init value 
  374. neither TRUE nor FALSE.
  375. canceled, 
  376. xdismissed,
  377. rather 
  378. ..." 
  379. dialogMessage3 
  380. "User chose ""
  381.     listbox has 
  382. "NoDismiss".
  383. ..." 
  384. which 
  385. }-clicking 
  386. "Directories" 
  387. merely updates 
  388. controls.
  389. --        5 
  390. "OK" 
  391. --        6 
  392. --        7 
  393. --        1 
  394. LBN_SELCHANGE.
  395. --        2 
  396. LBN_DBLCLK
  397. --        1033 
  398. dialogMessage4 
  399. "     = 7
  400. selected 
  401. Add 1 because 
  402. 0-based.
  403. selectedLine 
  404.     7, 1033, 0, 0) + 1
  405.      = 1
  406. licked 
  407. " && 
  408.      = 2
  409. DOUBLE-clicked 
  410. " && 
  411.  limits 
  412. values shown 
  413. %follows:
  414. --        6 
  415. tequivalent 
  416. --            (
  417. hiword 
  418. --        1045 
  419. EM_LIMITTEXT
  420. --            
  421.  are:
  422. dialogMessage5 
  423.  = 6 
  424.  = 768
  425. 6,1045,10,0)
  426. scripts 
  427. level
  428. dialogMessage1
  429. dialogMessage2
  430. dialogMessage
  431. dialogMessage3
  432. dialogMessage4
  433. enterBook
  434. dialogMessage5
  435. rightButtonDoubleClick
  436. enterBook
  437. GetDlgItem
  438. GetWindowTextLength
  439. EnableWindow
  440. CheckRadioButton
  441. SetFocus
  442. SendDlgItemMessage
  443. SendMessage
  444. dialogMessage
  445. hDlg:        
  446. wMessage:    
  447. wParam:       
  448. lParamLO:    
  449. lParamHI:    
  450. lParamHI
  451. lParamLO
  452. wParam
  453. wMessage
  454. dialogMessage1
  455. getWindowTextLength
  456. checkRadioButton
  457. GetDlgItem
  458. SendMessage
  459. SetFocus
  460. hEditControl
  461. lParamHI
  462. lParamLO
  463. wParam
  464. wMessage
  465. dialogMessage2
  466. GetDlgItem
  467. getWindowTextLength
  468. EnableWindow
  469. EnableWindow
  470. hOKButton
  471. lParamHI
  472. lParamLO
  473. wParam
  474. wMessage
  475. dialogMessage3
  476. User chose "Don't Dismiss"
  477. lParamHI
  478. lParamLO
  479. wParam
  480. wMessage
  481. dialogMessage4
  482. SendDlgItemMessage
  483. User clicked listbox item
  484. User DOUBLE-clicked listbox item
  485. selectedLine
  486. lParamHI
  487. lParamLO
  488. wParam
  489. wMessage
  490. dialogMessage5
  491. SendDlgItemMessage
  492. lParamHI
  493. lParamLO
  494. wParam
  495. wMessage
  496. rightButtonDoubleClick
  497.